using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

using MBMC.Paths;

namespace MBMC.Dialogs
{
    public partial class ClientScripts : Form
    {
        string mbfolder;
        MBMC.Paths.Paths p = new MBMC.Paths.Paths();
        public ClientScripts(string actualmbfolder)
        {
            InitializeComponent();
            mbfolder = actualmbfolder;
        }

        private void ServerScripts_Load(object sender, EventArgs e)
        {
            System.IO.DirectoryInfo di = new System.IO.DirectoryInfo(p.Vrat_Cestu(mbfolder, MBPaths.FMCSClientScripts_Marblefolder));
            foreach (System.IO.FileInfo file in di.GetFiles("*.cs"))
            {
                Console.WriteLine("{0}, {1}, {2}", file.Name, file.Length, file.Extension);
                listBox1.Items.Add(file.Name);
            }
        }

        private void button25_Click(object sender, EventArgs e)
        {
            /*
            HelpForms.ServerScriptsG4Help hg4_ = new MBMC.Dialogs.HelpForms.ServerScriptsG4Help();
            hg4_.ShowDialog();
             */
        }

        /*private void button1_Click(object sender, EventArgs e)
        {
            //audioprofiles.cs
            PrimitiveEditor pe = new PrimitiveEditor(p.Vrat_Cestu(mbfolder, MBMC.Paths.MBPaths.FMSS_SERVER_Scripts_Scripts_in_MarbleFolder) + "/audioprofiles.cs");
            pe.ShowDialog();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            //bumpers.cs
            PrimitiveEditor pe = new PrimitiveEditor(p.Vrat_Cestu(mbfolder, MBMC.Paths.MBPaths.FMSS_SERVER_Scripts_Scripts_in_MarbleFolder) + "/bumpers.cs");
            pe.ShowDialog();
        }

        private void button4_Click(object sender, EventArgs e)
        {
            //buttons.cs
            PrimitiveEditor pe = new PrimitiveEditor(p.Vrat_Cestu(mbfolder, MBMC.Paths.MBPaths.FMSS_SERVER_Scripts_Scripts_in_MarbleFolder) + "/buttons.cs");
            pe.ShowDialog();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            //camera.cs
            PrimitiveEditor pe = new PrimitiveEditor(p.Vrat_Cestu(mbfolder, MBMC.Paths.MBPaths.FMSS_SERVER_Scripts_Scripts_in_MarbleFolder) + "/camera.cs");
            pe.ShowDialog();
        }

        private void button8_Click(object sender, EventArgs e)
        {
            //centerprints.cs
            PrimitiveEditor pe = new PrimitiveEditor(p.Vrat_Cestu(mbfolder, MBMC.Paths.MBPaths.FMSS_SERVER_Scripts_Scripts_in_MarbleFolder) + "/centerprints.cs");
            pe.ShowDialog();
        }

        private void button7_Click(object sender, EventArgs e)
        {
            //commands.cs
            PrimitiveEditor pe = new PrimitiveEditor(p.Vrat_Cestu(mbfolder, MBMC.Paths.MBPaths.FMSS_SERVER_Scripts_Scripts_in_MarbleFolder) + "/commands.cs");
            pe.ShowDialog();
        }

        private void button6_Click(object sender, EventArgs e)
        {
            //fireworks.cs
            PrimitiveEditor pe = new PrimitiveEditor(p.Vrat_Cestu(mbfolder, MBMC.Paths.MBPaths.FMSS_SERVER_Scripts_Scripts_in_MarbleFolder) + "/fireworks.cs");
            pe.ShowDialog();
        }

        private void button5_Click(object sender, EventArgs e)
        {
            //gems.cs
            PrimitiveEditor pe = new PrimitiveEditor(p.Vrat_Cestu(mbfolder, MBMC.Paths.MBPaths.FMSS_SERVER_Scripts_Scripts_in_MarbleFolder) + "/gems.cs");
            pe.ShowDialog();
        }

        private void button12_Click(object sender, EventArgs e)
        {
            //game.cs
            PrimitiveEditor pe = new PrimitiveEditor(p.Vrat_Cestu(mbfolder, MBMC.Paths.MBPaths.FMSS_SERVER_Scripts_Scripts_in_MarbleFolder) + "/game.cs");
            pe.ShowDialog();
        }

        private void button11_Click(object sender, EventArgs e)
        {
            //hazards.cs
            PrimitiveEditor pe = new PrimitiveEditor(p.Vrat_Cestu(mbfolder, MBMC.Paths.MBPaths.FMSS_SERVER_Scripts_Scripts_in_MarbleFolder) + "/hazards.cs");
            pe.ShowDialog();
        }

        private void button10_Click(object sender, EventArgs e)
        {
            //inventory.cs
            PrimitiveEditor pe = new PrimitiveEditor(p.Vrat_Cestu(mbfolder, MBMC.Paths.MBPaths.FMSS_SERVER_Scripts_Scripts_in_MarbleFolder) + "/inventory.cs");
            pe.ShowDialog();
        }

        private void button9_Click(object sender, EventArgs e)
        {
            //item.cs
            PrimitiveEditor pe = new PrimitiveEditor(p.Vrat_Cestu(mbfolder, MBMC.Paths.MBPaths.FMSS_SERVER_Scripts_Scripts_in_MarbleFolder) + "/item.cs");
            pe.ShowDialog();
        }

        private void button16_Click(object sender, EventArgs e)
        {
            //marble.cs
            PrimitiveEditor pe = new PrimitiveEditor(p.Vrat_Cestu(mbfolder, MBMC.Paths.MBPaths.FMSS_SERVER_Scripts_Scripts_in_MarbleFolder) + "/marble.cs");
            pe.ShowDialog();
        }

        private void button15_Click(object sender, EventArgs e)
        {
            //makers.cs
            PrimitiveEditor pe = new PrimitiveEditor(p.Vrat_Cestu(mbfolder, MBMC.Paths.MBPaths.FMSS_SERVER_Scripts_Scripts_in_MarbleFolder) + "/makers.cs");
            pe.ShowDialog();
        }

        private void button14_Click(object sender, EventArgs e)
        {
            //pads.cs
            PrimitiveEditor pe = new PrimitiveEditor(p.Vrat_Cestu(mbfolder, MBMC.Paths.MBPaths.FMSS_SERVER_Scripts_Scripts_in_MarbleFolder) + "/pads.cs");
            pe.ShowDialog();
        }

        private void button13_Click(object sender, EventArgs e)
        {
            //pathedinteriors.cs
            PrimitiveEditor pe = new PrimitiveEditor(p.Vrat_Cestu(mbfolder, MBMC.Paths.MBPaths.FMSS_SERVER_Scripts_Scripts_in_MarbleFolder) + "/pathedinteriors.cs");
            pe.ShowDialog();
        }

        private void button20_Click(object sender, EventArgs e)
        {
            //platformpart.cs
            PrimitiveEditor pe = new PrimitiveEditor(p.Vrat_Cestu(mbfolder, MBMC.Paths.MBPaths.FMSS_SERVER_Scripts_Scripts_in_MarbleFolder) + "/platformpart.cs");
            pe.ShowDialog();
        }

        private void button19_Click(object sender, EventArgs e)
        {
            //powerups.cs
            PrimitiveEditor pe = new PrimitiveEditor(p.Vrat_Cestu(mbfolder, MBMC.Paths.MBPaths.FMSS_SERVER_Scripts_Scripts_in_MarbleFolder) + "/powerups.cs");
            pe.ShowDialog();
        }

        private void button18_Click(object sender, EventArgs e)
        {
            //radiusdamage.cs
            PrimitiveEditor pe = new PrimitiveEditor(p.Vrat_Cestu(mbfolder, MBMC.Paths.MBPaths.FMSS_SERVER_Scripts_Scripts_in_MarbleFolder) + "/radiusdamage.cs");
            pe.ShowDialog();
        }

        private void button17_Click(object sender, EventArgs e)
        {
            //shapebase.cs
            PrimitiveEditor pe = new PrimitiveEditor(p.Vrat_Cestu(mbfolder, MBMC.Paths.MBPaths.FMSS_SERVER_Scripts_Scripts_in_MarbleFolder) + "/shapebase.cs");
            pe.ShowDialog();
        }

        private void button24_Click(object sender, EventArgs e)
        {
            //signs.cs
            PrimitiveEditor pe = new PrimitiveEditor(p.Vrat_Cestu(mbfolder, MBMC.Paths.MBPaths.FMSS_SERVER_Scripts_Scripts_in_MarbleFolder) + "/signs.cs");
            pe.ShowDialog();
        }

        private void button23_Click(object sender, EventArgs e)
        {
            //staticshape.cs
            PrimitiveEditor pe = new PrimitiveEditor(p.Vrat_Cestu(mbfolder, MBMC.Paths.MBPaths.FMSS_SERVER_Scripts_Scripts_in_MarbleFolder) + "/staticshape.cs");
            pe.ShowDialog();
        }

        private void button22_Click(object sender, EventArgs e)
        {
            //tiggers.cs
            PrimitiveEditor pe = new PrimitiveEditor(p.Vrat_Cestu(mbfolder, MBMC.Paths.MBPaths.FMSS_SERVER_Scripts_Scripts_in_MarbleFolder) + "/tiggers.cs");
            pe.ShowDialog();
        }*/

        private void button30_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void button21_Click(object sender, EventArgs e)
        {
            MBMC.Dialogs.HelpForms.ServerScriptsG1Help ssg1 = new MBMC.Dialogs.HelpForms.ServerScriptsG1Help();
            ssg1.ShowDialog();
        }

        private void button31_Click(object sender, EventArgs e)
        {

        }

        private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            label4.Text = p.Vrat_Cestu(mbfolder, MBPaths.FMCSClientScripts_Marblefolder) + "/" + listBox1.SelectedItem.ToString();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            PrimitiveEditor pe = new PrimitiveEditor(label4.Text);
            pe.ShowDialog();
        }
    }
}